<html>
<head>
    <script>

    function setDisplay(){
        var left = 250;
        var top = 250;
        var width = 300;
        var height = 300;
        alert("setdisplay==>"+left)
        AndroidMediaplayer.setDisplay(left,top,width,height);
    }

    function setDataSource(){
        document.getElementById("result").innerHTML = result;
        var code = "http://data.video.ptqy.gitv.tv/videos/other/20160725/fe/a1/3f7dbf84c23fa3424399a040cd7688cf.f4v?v=845642301";
        var result=AndroidMediaplayer.setDataSource(code);
        document.getElementById("result").innerHTML = result;
        alert(result);
    }

     function setDataSourceList(){
        var code = "http://data.video.ptqy.gitv.tv/videos/other/20160725/fe/a1/3f7dbf84c23fa3424399a040cd7688cf.f4v?v=845642301,http://data.video.ptqy.gitv.tv/videos/other/20160725/fe/a1/3f7dbf84c23fa3424399a040cd7688cf.f4v?v=845642301,http://data.video.ptqy.gitv.tv/videos/other/20160725/fe/a1/3f7dbf84c23fa3424399a040cd7688cf.f4v?v=845642301,http://data.video.ptqy.gitv.tv/videos/other/20160725/fe/a1/3f7dbf84c23fa3424399a040cd7688cf.f4v?v=845642301";
        var result=AndroidMediaplayer.setDataSourceList(code);
        alert(result);
    }

    function start(){
        var result=AndroidMediaplayer.start();
        alert(result);
    }

    function play(){
        var result=window.AndroidMediaplayer.play();
        alert(result);
    }

    function pause(){
        var result=AndroidMediaplayer.pause();
        alert(result);
    }

    function getDuration(){
        var result=AndroidMediaplayer.getDuration();
        alert(result);
    }

    function getCurrentPosition(){
        var result=AndroidMediaplayer.getCurrentPosition();
        alert(result);
    }

    function seekTo(){
        var result=AndroidMediaplayer.seekTo(5000);
        alert(result);
    }

    function onCompleted(){
        var result=AndroidMediaplayer.start();
        alert("onCompleted");
    }

    function onError(what,message){
        alert("onError" + what);
    }

    function release(){
        var result=AndroidMediaplayer.release();
        alert(result);
    }

  function fullScreen(){
      alert("fullScreen")
      AndroidMediaplayer.fullScreen();
    }
    function exitFullScreen(){
      alert("exitFullScreen")
      AndroidMediaplayer.exitFullScreen();
    }

    </script>
</head>
<body bgcolor="transparent">

<button onclick="setDisplay();">setDisplay</button>
<button onclick="setDataSource();">setDataSource</button>
<button onclick="setDataSourceList();">setDataSourceList</button>
<button onclick="start();">start</button>
<button onclick="play();">play</button>
<button onclick="pause();">pause</button>
<button onclick="getDuration();">getDuration</button>
<button onclick="getCurrentPosition();">getCurrentPosition</button>
<button onclick="seekTo();">seekTo</button>
<button onclick="release();">release</button>
<button onclick="fullScreen();">fullScreen</button>
<button onclick="exitFullScreen();">exitFullScreen</button>
<button onclick="startActivity();">startActivity</button>
<button onclick="getValue();">getValue</button>
<button onclick="goBack();">goBack</button>
<button onclick="finish();">finish</button>

<button onclick="finish();">finish</button>
<div style="width:1280px;height:800px;background:#0a0"></div>
<div>显示结果：</div>
<div id="result">...</div>
</body>
</html>